package Servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/peopleSearch")
public class peopleSearch extends HttpServlet {
	private static final long serialVersionUID = 1L;


	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		String[] st = new String[6];
		st[0]=request.getParameter("fName");
		st[1]=request.getParameter("lName");
		st[2]=request.getParameter("address");
		st[3]=request.getParameter("city");
		st[4]=request.getParameter("state");
		st[5]=request.getParameter("zipcode");
		
		System.out.print("Search People->");
		for(String s :st)
			System.out.print(s+"\t");
		System.out.println();
		
		RequestDispatcher rd=getServletContext().getRequestDispatcher("/View/searchPeople.jsp");
		rd.forward(request, response);
	}

}
